package cn.nawang.ebeim.client.bean;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class BreakPointQueue {

  private static BlockingQueue<TaskStatusBean> breakpointTaskQueue =
      new ArrayBlockingQueue<TaskStatusBean>(10000);

  public static BlockingQueue<TaskStatusBean> getTaskStatusBeanQueue() {
    return breakpointTaskQueue;
  }

  public static void enqueue(TaskStatusBean task) throws InterruptedException {
      breakpointTaskQueue.put(task);
  }

  public static TaskStatusBean dequeue() throws InterruptedException {
      return breakpointTaskQueue.take();
  }

  public static boolean isEmpty() {
    return breakpointTaskQueue.isEmpty();
  }
}
